var app = getApp()

Page({
  data:{},
  onLoad:function(options){
    var id = options.id;
    if(!id) id = 1;
    var that = this;
    app.showLoading();
    app.request("taskcard/"+id, "GET", null, function(res){
      that.setData({
        card : res.result,
        tasktype : JSON.parse(res.result.type).name
      });
      app.closeLoading();
    });


  }
})